let len = 0;
let obj = new Object();
const HashMap = {
    containsKey(key) {
        return (key in obj);
    },
    put(key, value) {
        if (!this.containsKey(key)) {
            len++;
        }
        obj[key] = value;
    },
    get(key) {
        return this.containsKey(key) ? obj[key] : null;
    },
    remove(key){  
        if(this.containsKey(key)&&(delete obj[key])){  
            len--;  
        }  
    },
    removeAll(){
        obj=new Object();
    } 
}
export {
    HashMap
}